3.99 \(\int \frac{\tan ^4(c+d x)}{(a+a \sec (c+d x))^3} \, dx\)

Optimal. Leaf size=46 \[ \frac{\tanh ^{-1}(\sin (c+d x))}{a^3 d}-\frac{4 \tan (c+d x)}{a^2 d (a \sec (c+d x)+a)}+\frac{x}{a^3} \]

[Out]

x/a^3 + ArcTanh[Sin[c + d*x]]/(a^3*d) - (4*Tan[c + d*x])/(a^2*d*(a + a*Sec[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.140903, antiderivative size = 48, normalized size of antiderivative = 1.04, number of steps used = 12, number of rules used = 9, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {3888, 3886, 3473, 8, 2606, 3767, 2621, 321, 207} \[ \frac{4 \cot (c+d x)}{a^3 d}-\frac{4 \csc (c+d x)}{a^3 d}+\frac{\tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac{x}{a^3} \]

Antiderivative was successfully verified.

[In]

Int[Tan[c + d*x]^4/(a + a*Sec[c + d*x])^3,x]

[Out]

x/a^3 + ArcTanh[Sin[c + d*x]]/(a^3*d) + (4*Cot[c + d*x])/(a^3*d) - (4*Csc[c + d*x])/(a^3*d)

Rule 3888

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Dist[a^(2*n
)/e^(2*n), Int[(e*Cot[c + d*x])^(m + 2*n)/(-a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && E
qQ[a^2 - b^2, 0] && ILtQ[n, 0]

Rule 3886

Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Int[ExpandI
ntegrand[(e*Cot[c + d*x])^m, (a + b*Csc[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 0]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 2621

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(f*a^n)^(-1), Subst
[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && Integer
Q[(n + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\tan ^4(c+d x)}{(a+a \sec (c+d x))^3} \, dx &=\frac{\int \cot ^2(c+d x) (-a+a \sec (c+d x))^3 \, dx}{a^6}\\ &=\frac{\int \left (-a^3 \cot ^2(c+d x)+3 a^3 \cot (c+d x) \csc (c+d x)-3 a^3 \csc ^2(c+d x)+a^3 \csc ^2(c+d x) \sec (c+d x)\right ) \, dx}{a^6}\\ &=-\frac{\int \cot ^2(c+d x) \, dx}{a^3}+\frac{\int \csc ^2(c+d x) \sec (c+d x) \, dx}{a^3}+\frac{3 \int \cot (c+d x) \csc (c+d x) \, dx}{a^3}-\frac{3 \int \csc ^2(c+d x) \, dx}{a^3}\\ &=\frac{\cot (c+d x)}{a^3 d}+\frac{\int 1 \, dx}{a^3}-\frac{\operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{a^3 d}+\frac{3 \operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^3 d}-\frac{3 \operatorname{Subst}(\int 1 \, dx,x,\csc (c+d x))}{a^3 d}\\ &=\frac{x}{a^3}+\frac{4 \cot (c+d x)}{a^3 d}-\frac{4 \csc (c+d x)}{a^3 d}-\frac{\operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{a^3 d}\\ &=\frac{x}{a^3}+\frac{\tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac{4 \cot (c+d x)}{a^3 d}-\frac{4 \csc (c+d x)}{a^3 d}\\ \end{align*}

Mathematica [B]  time = 0.259056, size = 117, normalized size = 2.54 \[ \frac{8 \cos ^5\left (\frac{1}{2} (c+d x)\right ) \sec ^3(c+d x) \left (\cos \left (\frac{1}{2} (c+d x)\right ) \left (-\log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )+\log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )+d x\right )-4 \sec \left (\frac{c}{2}\right ) \sin \left (\frac{d x}{2}\right )\right )}{a^3 d (\sec (c+d x)+1)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[c + d*x]^4/(a + a*Sec[c + d*x])^3,x]

[Out]

(8*Cos[(c + d*x)/2]^5*Sec[c + d*x]^3*(Cos[(c + d*x)/2]*(d*x - Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + Log[C
os[(c + d*x)/2] + Sin[(c + d*x)/2]]) - 4*Sec[c/2]*Sin[(d*x)/2]))/(a^3*d*(1 + Sec[c + d*x])^3)

________________________________________________________________________________________

Maple [A]  time = 0.082, size = 76, normalized size = 1.7 \begin{align*} -4\,{\frac{\tan \left ( 1/2\,dx+c/2 \right ) }{d{a}^{3}}}+2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{3}}}+{\frac{1}{d{a}^{3}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) }-{\frac{1}{d{a}^{3}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(d*x+c)^4/(a+a*sec(d*x+c))^3,x)

[Out]

-4/d/a^3*tan(1/2*d*x+1/2*c)+2/d/a^3*arctan(tan(1/2*d*x+1/2*c))+1/d/a^3*ln(tan(1/2*d*x+1/2*c)+1)-1/d/a^3*ln(tan
(1/2*d*x+1/2*c)-1)

________________________________________________________________________________________

Maxima [B]  time = 1.70578, size = 132, normalized size = 2.87 \begin{align*} \frac{\frac{2 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} + \frac{\log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} - \frac{\log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}} - \frac{4 \, \sin \left (d x + c\right )}{a^{3}{\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+a*sec(d*x+c))^3,x, algorithm="maxima")

[Out]

(2*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^3 + log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^3 - log(sin(d*x +
c)/(cos(d*x + c) + 1) - 1)/a^3 - 4*sin(d*x + c)/(a^3*(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

Fricas [A]  time = 1.15144, size = 225, normalized size = 4.89 \begin{align*} \frac{2 \, d x \cos \left (d x + c\right ) + 2 \, d x +{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 8 \, \sin \left (d x + c\right )}{2 \,{\left (a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+a*sec(d*x+c))^3,x, algorithm="fricas")

[Out]

1/2*(2*d*x*cos(d*x + c) + 2*d*x + (cos(d*x + c) + 1)*log(sin(d*x + c) + 1) - (cos(d*x + c) + 1)*log(-sin(d*x +
 c) + 1) - 8*sin(d*x + c))/(a^3*d*cos(d*x + c) + a^3*d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\tan ^{4}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec{\left (c + d x \right )} + 1}\, dx}{a^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)**4/(a+a*sec(d*x+c))**3,x)

[Out]

Integral(tan(c + d*x)**4/(sec(c + d*x)**3 + 3*sec(c + d*x)**2 + 3*sec(c + d*x) + 1), x)/a**3

________________________________________________________________________________________

Giac [A]  time = 2.67768, size = 85, normalized size = 1.85 \begin{align*} \frac{\frac{d x + c}{a^{3}} + \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} - \frac{4 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{3}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(d*x+c)^4/(a+a*sec(d*x+c))^3,x, algorithm="giac")

[Out]

((d*x + c)/a^3 + log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^3 - log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^3 - 4*tan(1/2*d
*x + 1/2*c)/a^3)/d